<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Facelet Title</title>
        <ui:include src="../Cliente/header.xhtml"/>
        <ui:include src="../Cliente/menu.xhtml"/>
    </h:head>
    <h:body>
        #{managedBeanCarrito.cargaInfo()}
        <h:form>
        <div>
            <div id="imgProducto">
                <!--<h:graphicImage name="img" url="#{managedBeanInfo.imagen}"/>-->
            </div>
            <div id="infoProducto">
                <span class="Nombre"><h:outputLabel id="nom" value="#{managedBeanCarrito.producto.nombre}"/></span><br/>
                <span class="Descripcion"><h:outputLabel id="des" value="#{managedBeanCarrito.producto.descripcion}"/></span><br/>
                <span class="Precio"><h:outputLabel id="pre" value="#{managedBeanCarrito.producto.precio}"/></span>
                Cantidad: <p:spinner id="minmax" value="#{managedBeanCarrito.cantidad}" min="1"> 
                    <!--<f:validateLongRange minimum="0"/>-->
                </p:spinner>
            </div>
            <div id="enviar">
                <c:set var="prod" value="#{managedBeanCarrito.idU}" />
                <h:commandButton value="Agregar" action="#{managedBeanCarrito.añadirCarrito(prod)}" />
            </div>
        </div>
        </h:form>

    </h:body>
</html>

